package cn.codeforfun.stream.sender;

import cn.codeforfun.stream.config.Barista;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.messaging.Source;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.MessageChannel;
import org.springframework.stereotype.Component;

/**
 * Package cn.codeforfun.stream.sender
 * Project springclouddemo
 * Company  PACTERA
 * Author bin.wang
 * Created on 2017/3/10 11:00
 * version 1.0.0
 */
@Component
public class Sender {

  @Autowired
  private MessageChannel messageChannel;

  public void sendMessage(String msg) {
    messageChannel.send(MessageBuilder.withPayload(msg).build());
  }
}
